package agency.tango.materialintro.slice;

import agency.tango.materialintro.ResourceTable;
import agency.tango.materialintro.fractions.FractionDemo;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.ability.fraction.FractionAbility;
import ohos.aafwk.content.Intent;

public class FractionDemoAbilitySlice extends AbilitySlice {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_fraction_demo);
        initView();
    }

    private void initView() {
        ((FractionAbility) getAbility()).getFractionManager()
                .startFractionScheduler().add(ResourceTable.Id_fragment_container, new FractionDemo()).submit();
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
